package com.xiangge.zuoye2;

public class Demo5 {
    public static void main(String[] args) {
        for (int i = 0; i <= 20; i++) {//鸡公
            for (int j = 0; j < 33; j++) {
                int a = 100-i-j;
                if ((a%3==0)&&(i*5+j*3+a/3==100)){
                    System.out.println("鸡公有"+i+"只，鸡母有"+j+"只，" +
                            "鸡崽有"+a+"只，");
                }
            }

        }
    }
}
